﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FluentNHibernate.Mapping;

namespace AssetAllocationSystem.Models.Mapping
{
    public class EmployeeMapping : SubclassMap<Employee>
    {
        public EmployeeMapping()
        {
            Table("Employee");
            Map(a => a.Id);
            HasMany(a => a.Allocations);
            HasMany(a => a.Requests);
            References(a => a.Location).Column("Location_Id");
            References(a => a.Company).Column("Company_Id");
            DiscriminatorValue((int) DiscriminatorEnum.EMPLOYEE);
        }
    }
}